#include "MyObject2.h"
#include <iostream>
using namespace std;

Pool MyObject::pool(sizeof(MyObject), 5, true);

void * MyObject::operator new(size_t size)
{
	return pool.allocate();
}

void MyObject::operator delete(void * ptr)
{
	pool.deallocate(ptr);
}

ostream& operator<<(ostream& os, const MyObject& o)
{
   return os << '{' << o.id << ',' << o.name << '}';
}

